To avoid name conflicts among Newton applications we are having developers register a single signature. You do not need to register individual applications. Once you have a signature, the guidelines below explain how to ensure the various global symbols and string your application uses will be unique.
Signature
Example: PIEDTS
Signatures are an arbitrary sequence of approximately 4 to 10 characters (colons and vertical bars are not allowed, case is not significant).
Application Name
Example:
Llama
This is the string displayed under your application's icon in the Extras drawer. This symbol does not have to be unique. So it would be possible for there to be two applications named "Chess" on the market. Presumably, their icons would distinguish them if they were both installed.
Application Symbol
Example:
'|Llama:PIEDTS|
The appSymbol is formed by concatentating the application name, a colon, and the registered signature. This symbol is not normally visible to the end user. It is used to uniquely identify an application to the root view. Note: since appSymbols contain a colon, they have to be enclosed in vertical bars where they appear explicitly in NewstonScript code
Package Name
Example:
Llama:PIEDTS
The package name is simply a string version of the appSymbol. The package name, is visible to the user in the pop up menu for removing software. Package names are limited to 26 characters, so this places a practical limit on the combined length of application names and signatures.
Predefined Constants
It is suggested that you define constants for your appSymbol and package name in your "Project Data" file: Example:
constant kAppSymbol := '|Llama:PIEDTS|;
constant kPackageName := "Llama:PIEDTS";
Use these constants throughout your code instead of hard coding in values. This will make it easier to maintain your code. All you have to do is keep your constant definitions consistent with the values in NTK's Settings... dialog. A future version of NTK may automatically define these constants for you.
For the remaining examples we will assume the above constant definitions are in effect.
Soup Names
Examples:
Llama:PIEDTS
kPackageName
soup1:Llama:PIEDTS
soup2 & kPackageName
The soups your application creates need to have unique names. You can use your package name directly or along with a colon as a suffix to a descriptive soup name. Soup names are not normally visible to the user. They are displayed to users by Newton Connection.
System Soup Tag
Example: {tag: kPackageName, firstName: "Reg"} Applications are expected to store their preferences data in the system soup. Each application is supposed to create a single soup entry with a unique tag slot and other application specific slots. Use your package name as your tag. This tag is not normally visible to the end user. However, if utility software is written to "clean up" the System soup, this tag may be used to prompt the user asking whether or not to delete an entry.
Additional Soup Fields
Example:
entry.(kAppSymbol) := { <AppSpecificData> };
Applications are encouraged to utilize existing soups, like the Names soup. If applications needs to store their own data in entries of an existing soup, they should create a single slot using their appSymbol as the slot name.
Applications need to store their formatting frames in the root view. Each formatting frame should be given a name and stored in the root view in a slot whose name is the format's name concatenated with a colon and the appSymbol.
Global Variables
Example:
GetGlobals().(kAppSymbol) := <AppSpecificData>;
Although the use of system wide global variables is strongly discouraged, it's sometimes necessary to use them. For this purpose, your application should create a single repository for global data by adding a slot to the global's frame using its appSymbol as the slot name.
HowToRegister
To register your signature, please send the following information to
PIESYSOP on AppleLink
or
PIESYSOP, MS/305-2A, 20525 Mariani Ave, Cupertino, CA 95014